import http from './interface'

//超级测试管理员模式获取信息
export const _getRoomDeviceInfo = (data) => {
    return http.request({
        url: 'equipment/getRoomDeviceInfo',
        // url: 'address/detail',
        method: 'GET',
        header:'h',
        data,
        // handle:true
    })
};

//多个订单信息，选择中一个订单，获取设备信息
export const _getOneOrderEquipment = (data) => {
    return http.request({
        url: 'equipment/getOneOrderEquipment',
        // url: 'address/detail',
        method: 'GET',
        header:'h',
        data,
        // handle:true
    })
};

//控制时获取用户的订单信息
export const _getOrderEquipment = (data) => {
    return http.request({
        url: 'equipment/getOrderEquipment',
        // url: 'address/detail',
        method: 'GET',
        header:'h',
        data,
        // handle:true
    })
};

// 获取所有设备
export const _getRoomEquipment = (data) => {
    return http.request({
        url: 'equipment/getUserPastRoom',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};

///////////////// 灯光控制 //////////////

// 打开所有灯
export const _openAll = (data) => {
    return http.request({
        url: 'light/openAll',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 关闭所有灯
export const _closeAll = (data) => {
    return http.request({
        url: 'light/closeAll',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 关闭灯
export const _closeOneInfo = (data) => {
    return http.request({
        url: 'light/closeOneInfo',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 打开灯
export const _openOneInfo = (data) => {
    return http.request({
        url: 'light/openOneInfo',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};

//打开身份证门锁
export const _openidCardlock = (data) => {
    return http.request({
        url: 'model/openidCardlock',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
///////////////// 模式控制 //////////////

// 关闭模式
export const _closeOneModel = (data) => {
    return http.request({
        url: 'model/closeOneModel',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 打开模式
export const _controlOneModel = (data) => {
    return http.request({
        url: 'model/controlOneModel',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};

///////////////// 窗帘控制 //////////////

// 打开窗帘窗纱
export const _openWindowScreen = (data) => {
    return http.request({
        url: 'model/openWindowScreen',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 关闭窗帘窗纱
export const _closeWindowScreen = (data) => {
    return http.request({
        url: 'model/closeWindowScreen',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};

///////////////// 空调控制 //////////////

// 打开空调
export const _airOpen = (data) => {
    return http.request({
        url: 'air/open',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 关闭空调
export const _airClose = (data) => {
    return http.request({
        url: 'air/close',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 设置空调温度
export const _airSetTem = (data) => {
    return http.request({
        url: 'air/setTem',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 设置空调增加温度
export const _airIncTem = (data) => {
    return http.request({
        url: 'air/incTem',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 设置空调降低温度
export const _airDecTem = (data) => {
    return http.request({
        url: 'air/decTem',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 设置空调模式 制冷0，制热1
export const _airSelectMode = (data) => {
    return http.request({
        url: 'air/selectMode',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 设置空调风速 1:低，2:中，3:高
export const _airSetWindSpeed = (data) => {
    return http.request({
        url: 'air/setWindSpeed',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};

///////////////// 电视控制 //////////////

// 打开电视
export const _openTelevision = (data) => {
    return http.request({
        url: 'model/openTelevision',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 关闭电视
export const _closeTelevision = (data) => {
    return http.request({
        url: 'model/closeTelevision',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 电视加频道
export const _addTVChannel = (data) => {
    return http.request({
        url: 'model/addTVChannel',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 电视减频道
export const _decTVChannel = (data) => {
    return http.request({
        url: 'model/decTVChannel',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};
// 设置电视频道
export const _setTVChannel = (data) => {
    return http.request({
        url: 'model/setTVChannel',
        // url: 'address/detail',
        method: 'POST',
        header:'h',
        data,
        // handle:true
    })
};